package cn.tp.ksoft.civil_driver.module.mime;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import cn.tp.ksoft.library_civil.view.AppManager;
import cn.tp.ksoft.civil_driver.DriverBaseActivity;
import cn.tp.ksoft.civil_driver.R;
import cn.tp.ksoft.civil_driver.module.login.LoginActivity;

/**
 * Created by zhusong on 16/5/2.
 */
public class SettingActivity extends DriverBaseActivity implements View.OnClickListener{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.driver_activity_setting);
        updateTitle(getString(R.string.driver_setting));
        findViewById(R.id.ll_account).setOnClickListener(this);
        findViewById(R.id.ll_message).setOnClickListener(this);
        findViewById(R.id.btn_logout).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.ll_account : {
                Intent intent = new Intent(this, ModifyAccountActivity.class);
                startActivity(intent);
                break;
            }
            case R.id.ll_message : {
                Intent intent = new Intent(this, MessageNotifyActivity.class);
                startActivity(intent);
                break;
            }
            case R.id.btn_logout : {
                Intent intent = new Intent(this, LoginActivity.class);
                startActivity(intent);
                AppManager.getAppManager().finishAllActivity();

                break;
            }
        }
    }
}
